package com.swak.boot.config.consistency.reliablemsg;

import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.swak.consistency.reliablemsg.manager.ReliableMsgManager;
import com.swak.consistency.reliablemsg.manager.impl.ReliableMsgManagerImpl;
import com.swak.consistency.reliablemsg.storage.ReliableMsgLogStorage;

/**
 * 可靠消息管理
 * 
 * @author DELL
 */
@Configuration
@ConditionalOnBean(ReliableMsgLogStorage.class)
@ConditionalOnProperty(prefix = "spring.reliableMsg.mamager", name = "enable", matchIfMissing = true)
public class ReliablemsgManagerAutoConfiguration {

	@Bean
	public ReliableMsgManager ReliableMsgManager() {
		return new ReliableMsgManagerImpl();
	}
}
